/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { registerEditorProvider } from '@ibiz-template/runtime';
import { App } from 'vue';
import { GroupShifts } from './group-shifts';
import { GroupShiftsProvider } from './group-shifts.provider';

export default {
  install(app: App) {
    // 全局注册编辑器插件组件
    app.component(GroupShifts.name!, GroupShifts);
    // 全局注册编辑器插件适配器，EDITOR_CUSTOMSTYLE是插件类型，ATTENDANCE_GROUP_SHIFTS是插件标识
    registerEditorProvider(
      'EDITOR_CUSTOMSTYLE_ATTENDANCE_GROUP_SHIFTS',
      () => new GroupShiftsProvider(),
    );
  },
};
